package com.guigu.chenjiajun.controller;

import com.guigu.chenjiajun.service.ProductionRegistrationAuditService;
import com.guigu.chenjiajun.vo.ProceduringVo;
import com.guigu.common.pojo.MManufacture;
import com.guigu.common.pojo.MProcedure;
import com.guigu.common.vo.SearchVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/ProductionRegistrationAudit")
public class ProductionRegistrationAuditController {


    @Resource
    private ProductionRegistrationAuditService productionRegistrationAuditService;

    @RequestMapping("/queryProductionAudit")
    @ResponseBody
    public SearchVo<MManufacture> queryProductionAudit(@RequestBody SearchVo searchVo){
        return this.productionRegistrationAuditService.queryProductionAudit(searchVo);
    }

    @RequestMapping("/checkInQueryProceduring")
    @ResponseBody
    public ProceduringVo checkInQueryProceduring(String id, String procedure_id){
        return this.productionRegistrationAuditService.checkInQueryProceduring(id,procedure_id);
    }

    @RequestMapping("/submitAuditaa")
    @ResponseBody
    public int submitAuditaa(@RequestBody ProceduringVo proceduringVo){
        return this.productionRegistrationAuditService.submitAuditaa(proceduringVo);
    }

    @RequestMapping("/TransferOfAudit")
    @ResponseBody
    public MProcedure TransferOfAudit(String id, String parentId){
        return this.productionRegistrationAuditService.TransferOfAudit(id,parentId);
    }

    @RequestMapping("/SubmitForHandoverReview")
    @ResponseBody
    public int SubmitForHandoverReview(String manufactureId,String parentId,String procedureId){
        return this.productionRegistrationAuditService.SubmitForHandoverReview(manufactureId,parentId,procedureId);
    }

    @RequestMapping("/SubmitHandoverReviewAndWarehousing")
    @ResponseBody
    public int SubmitHandoverReviewAndWarehousing(@RequestBody MManufacture mManufacture){
        return this.productionRegistrationAuditService.SubmitHandoverReviewAndWarehousing(mManufacture);
    }

}
